<?php
if (isset($_GET['reponse']) && isset($_GET['id_station']) &&
        isset($_GET['x_station']) && isset($_GET['y_station'])) {
    $reponse = $_GET['reponse'];
    $id_station = $_GET['id_station'];
    $x_station = $_GET['x_station'];
    $y_station = $_GET['y_station'];

    $fichierTXT = fopen("../ressources/reponses.txt", "a+");

    $ligne = $reponse . "," . $id_station . "," . $x_station . "," . $y_station . ":";

    fputs($fichierTXT, $ligne);
    fclose($fichierTXT);
}